import 'package:json_annotation/json_annotation.dart';



@JsonSerializable()
class BlindBoxPageCommodity {
  BlindBoxPageCommodity();

  String? ipCode;
  String? ipName;
  List<BlindBoxDetail>? blindBoxDetailVoList;

  factory BlindBoxPageCommodity.fromJson(Map<String,dynamic> json) {
    return BlindBoxPageCommodity()
      ..ipCode = json['ipCode'] as String?
      ..ipName = json['ipName'] as String?
      ..blindBoxDetailVoList = (json['blindBoxDetailVoList'] as List?)
          ?.map((e) => BlindBoxDetail.fromJson(e as Map<String, dynamic>))
          .toList();
  }

  Map<String, dynamic> toJson() {
    return {
      'ipCode': ipCode,
      'ipName': ipName,
      'blindBoxDetailVoList': blindBoxDetailVoList?.map((e) => e.toJson()).toList(),
    };
  }
}

@JsonSerializable()
class BlindBoxDetail {
  String? commodityId;
  String? ipCode;
  String? ipName;
  String? mainImageUrl;
  String? illustratedHandbookUrl;
  String? serialNumber;
  String? commodityName;
  double? originalPrice;
  double? salePrice;

  BlindBoxDetail();

  factory BlindBoxDetail.fromJson(Map<String, dynamic> json) {
    return BlindBoxDetail()
      ..commodityId = json['commodityId'] as String?
      ..ipCode = json['ipCode'] as String?
      ..ipName = json['ipName'] as String?
      ..mainImageUrl = json['mainImageUrl'] as String?
      ..illustratedHandbookUrl = json['illustratedHandbookUrl'] as String?
      ..serialNumber = json['serialNumber'] as String?
      ..commodityName = json['commodityName'] as String?
      ..originalPrice = (json['originalPrice'] as num?)?.toDouble()
      ..salePrice = (json['salePrice'] as num?)?.toDouble();
  }

  Map<String, dynamic> toJson() {
    return {
      'commodityId': commodityId,
      'ipCode': ipCode,
      'ipName': ipName,
      'mainImageUrl': mainImageUrl,
      'illustratedHandbookUrl': illustratedHandbookUrl,
      'serialNumber': serialNumber,
      'commodityName': commodityName,
      'originalPrice': originalPrice,
      'salePrice': salePrice,
    };
  }
}





@JsonSerializable()
class BlindBoxPageMore {
  BlindBoxPageMore();

  String? commodityId;
  String? mainImageUrl;
  String? commodityName;
  String? illustratedHandbookUrl;
  String? serialNumber;
  num? originalPrice;
  num? salePrice;
  String? boxCode;
  List<BlindBoxDetailMore>? commoditySkuVoList;
  List<PacketInfoVo>? packetInfoVoList;

  factory BlindBoxPageMore.fromJson(Map<String,dynamic> json) {
    return BlindBoxPageMore()
      ..commodityId = json['commodityId'] as String?
      ..mainImageUrl = json['mainImageUrl'] as String?
      ..commodityName = json['commodityName'] as String?
      ..illustratedHandbookUrl = json['illustratedHandbookUrl'] as String?
      ..serialNumber = json['serialNumber'] as String?
      ..originalPrice = json['originalPrice'] as num?
      ..salePrice = json['salePrice'] as num?
      ..boxCode = json['boxCode'] as String?
      ..commoditySkuVoList = (json['commoditySkuVoList'] as List?)
          ?.map((e) => BlindBoxDetailMore.fromJson(e as Map<String, dynamic>))
          .toList()
      ..packetInfoVoList = (json['packetInfoVoList'] as List?)
          ?.map((e) => PacketInfoVo.fromJson(e as Map<String, dynamic>))
          .toList();
  }

  Map<String, dynamic> toJson() {
    return {
      'commodityId': commodityId,
      'mainImageUrl': mainImageUrl,
      'commodityName': commodityName,
      'illustratedHandbookUrl': illustratedHandbookUrl,
      'serialNumber': serialNumber,
      'originalPrice': originalPrice,
      'salePrice': salePrice,
      'boxCode': boxCode,
      'commoditySkuVoList': commoditySkuVoList?.map((e) => e.toJson()).toList(),
      'packetInfoVoList': packetInfoVoList?.map((e) => e.toJson()).toList(),
    };
  }
}

@JsonSerializable()
class BlindBoxDetailMore {
  String? id;
  String? creatorId;
  String? createBy;
  String? createTime;
  String? updaterId;
  String? updateBy;
  String? updateTime;
  String? remark;
  int? delFlag;
  String? tenantId;
  String? commodityCode;
  String? commodityName;
  String? skuCode;
  String? skuName;
  String? skuImageUrl;
  String? rarity;
  String? illustratedHandbookUrl;
 
  BlindBoxDetailMore();

  factory BlindBoxDetailMore.fromJson(Map<String, dynamic> json) {
    return BlindBoxDetailMore()
      ..id = json['id'] as String?
      ..creatorId = json['creatorId'] as String?
      ..createBy = json['createBy'] as String?
      ..createTime = json['createTime'] as String?
      ..updaterId = json['updaterId'] as String?
      ..updateBy = json['updateBy'] as String?
      ..updateTime = json['updateTime'] as String?
      ..remark = json['remark'] as String?
      ..delFlag = json['delFlag'] as int?
      ..tenantId = json['tenantId'] as String?
      ..commodityCode = json['commodityCode'] as String?
      ..commodityName = json['commodityName'] as String?
      ..skuCode = json['skuCode'] as String?
      ..skuName = json['skuName'] as String?
      ..skuImageUrl = json['skuImageUrl'] as String?
      ..rarity = json['rarity'] as String?
      ..illustratedHandbookUrl = json['illustratedHandbookUrl'] as String?;
  }

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'creatorId': creatorId,
      'createBy': createBy,
      'createTime': createTime,
      'updaterId': updaterId,
      'updateBy': updateBy,
      'updateTime': updateTime,
      'remark': remark,
      'delFlag': delFlag,
      'tenantId': tenantId,
      'commodityCode': commodityCode,
      'commodityName': commodityName,
      'skuCode': skuCode,
      'skuName': skuName,
      'skuImageUrl': skuImageUrl,
      'rarity': rarity,
      'illustratedHandbookUrl': illustratedHandbookUrl,
    };
  }
}
@JsonSerializable()
class PacketInfoVo {
  String? id;
  String? creatorId;
  String? createBy;
  String? createTime;
  String? updaterId;
  String? updateBy;
  String? updateTime;
  String? remark;
  int? delFlag;
  String? tenantId;
  String? commodityCode;
  String? commodityName;
  String? skuCode;
  String? skuName;
  String? skuImageUrl;
  String? rarity;
  String? illustratedHandbookUrl;
  int? boxLocation;
 
  PacketInfoVo();

  factory PacketInfoVo.fromJson(Map<String, dynamic> json) {
    return PacketInfoVo()
      ..id = json['id'] as String?
      ..creatorId = json['creatorId'] as String?
      ..createBy = json['createBy'] as String?
      ..createTime = json['createTime'] as String?
      ..updaterId = json['updaterId'] as String?
      ..updateBy = json['updateBy'] as String?
      ..updateTime = json['updateTime'] as String?
      ..remark = json['remark'] as String?
      ..delFlag = json['delFlag'] as int?
      ..tenantId = json['tenantId'] as String?
      ..commodityCode = json['commodityCode'] as String?
      ..commodityName = json['commodityName'] as String?
      ..skuCode = json['skuCode'] as String?
      ..skuName = json['skuName'] as String?
      ..skuImageUrl = json['skuImageUrl'] as String?
      ..rarity = json['rarity'] as String?
      ..illustratedHandbookUrl = json['illustratedHandbookUrl'] as String?
      ..boxLocation = json['boxLocation'] as int?;
  }

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'creatorId': creatorId,
      'createBy': createBy,
      'createTime': createTime,
      'updaterId': updaterId,
      'updateBy': updateBy,
      'updateTime': updateTime,
      'remark': remark,
      'delFlag': delFlag,
      'tenantId': tenantId,
      'commodityCode': commodityCode,
      'commodityName': commodityName,
      'skuCode': skuCode,
      'skuName': skuName,
      'skuImageUrl': skuImageUrl,
      'rarity': rarity,
      'illustratedHandbookUrl': illustratedHandbookUrl,
      'boxLocation': boxLocation,
    };
  }
}